<template>
	<el-dialog :visible.sync="options.open" :width="options.width" class="contract">
		<div class="warn-dialog-header">
			<span>{{ options.companyTitle }}</span>
		</div>
		<div class="uploaDagreement" v-show="options.companyTitle == '协议上传'">
			<el-upload v-show="fileUrl==''" class="avatar-uploader" :show-file-list="false" :data="condition"
				action="http://192.168.11.149:8001/wechat/common/fileUpload" :limit="3" accept=".pdf"
				:on-success="uploadSucessPDf" :before-upload="uploadBefores">
				<i class="el-icon-plus borderPlus"></i>
			</el-upload>
			<div v-show="agreementName!=''">
				{{agreementName}} <span @click="agreementName=''" class="delBox">删除</span>
			</div>
		</div>

		<div class="oprationBtn" v-show="options.companyTitle == '协议上传'">
			<button class="oprations" @click="subFile">确定</button>

		</div>
		<div class="uploaDagreement" v-show="options.companyTitle == '协议列表'">
			<div v-for="item in  uploadData.agreementUrl">
				{{item.agreementName}} <span @click="delFile(item.id)" class="delBox">删除</span>
			</div>
		</div>
		<div class="rechageBox " v-show="options.companyTitle == '后台账户设置'">
			<el-row class="setBox" style="	border: none;">
				<el-col :span="24">
					<div class="grid-content bg-purple">
						<span class="titles">企业名称</span>
						<span class="titleNames"><input type="text" class="noneInput" @blur="checkMonney"
								placeholder="请输入" v-model="projectInfo.companyName" /></span>

					</div>
				</el-col>
				<el-col :span="24">
					<div class="grid-content bg-purple">
						<span class="titles">账号</span>
						<span class="titleNames"><input type="text" class="noneInput" @blur="checkMonney"
								placeholder="请输入" v-model="projectInfo.systemAccount" /></span>

					</div>
				</el-col>
				<el-col :span="24">
					<div class="grid-content bg-purple">
						<span class="titles">管理员手机号</span>
						<span class="titleNames"><input type="text" class="noneInput" @blur="checkMonney"
								placeholder="请输入" v-model="projectInfo.systemPhone" /></span>

					</div>
				</el-col>
				<span class="remind">账号密码默认位admin@123,请工作人员登录并修改</span>


			</el-row>
			<div class="oprationBtn">
				<button class="oprations" @click="subAccount">确定</button>

			</div>
		</div>
		<div class="rechageBox" v-show="options.companyTitle == '积分充值'">

			<el-row>
				<el-col :span="24">
					<div class="grid-content bg-purple">
						<span class="titles">企业名称</span>
						<span class="titleNames">{{ projectInfo.companyName }}</span>

					</div>
				</el-col>
				<el-col :span="24">
					<div class="grid-content bg-purple-light">
						<span class="titles">银行账号</span>
						<span class="titleNames">{{ projectInfo.accountNo }}</span>
					</div>
				</el-col>
				<el-col :span="24">
					<div class="grid-content bg-purple-light">
						<span class="titles">汇款金额</span>
						<span class="titleNames">{{ projectInfo.amount }}</span>
					</div>
				</el-col>
				<el-col :span="24">
					<div class="grid-content bg-purple-light">
						<span class="titles">汇款时间</span>
						<span class="titleNames">{{ projectInfo.payDate }}</span>
					</div>
				</el-col>
				<el-col :span="24">
					<div class="grid-content bg-purple-light">
						<span class="titles">积分充值</span>
						<span class="titleNames"><input type="text" class="noneInput" @blur="checkMonney"
								placeholder="请输入" v-model="amount" /></span>
						<span class="titleNames">{{ projectInfo.serviceCharge }}</span>
					</div>
				</el-col>
				<el-col :span="24">
					<div class="grid-content bg-purple-light">
						<span class="titles">管理员手机号</span>
						<span class="titleNames">133****2199</span>
					</div>
				</el-col>
				<el-col :span="24">
					<div class="grid-content bg-purple-light">
						<span class="titles">验证码</span>
						<span class="titleNames">{{ projectInfo.serviceCharge }}</span>
						<span class="titleNames"><input type="text" class="noneInput" placeholder="请输入"
								v-model="checkCode" /></span>
						<span class="getCodeBtn" v-show="show" @click="getCodes(3)">获取验证码</span>
						<span v-show="!show" class="count">已发送{{ count }} s</span>
					</div>
				</el-col>
			</el-row>
			<div class="oprationBtn">
				<button class="cancel" @click="options.open = false">取消</button><button class="oprations"
					@click="subRecharage">确定</button>

			</div>
		</div>
		<div class="msgBox" v-show="options.companyTitle == '拒绝验收说明'">
			{{ projectInfo.refusalReasons }}
		</div>


		<div class="msgBox red" v-show="options.companyTitle == '支付失败原因'">
			{{ projectInfo.reson }}
		</div>
		<div class="warn-dialog-body"
			v-show="options.companyTitle == '项目信息' || options.companyTitle == '项目审核' || options.companyTitle == '项目详情'">



			<el-row>
				<el-col :span="12">
					<div class="grid-content bg-purple">
						<span class="titles">项目名称</span>
						<span class="titleNames">{{ projectInfo.projectName }}</span>

					</div>
				</el-col>
				<el-col :span="12">
					<div class="grid-content bg-purple-light">
						<span class="titles">结算标准</span>
						<span class="titleNames">{{ projectInfo.serviceCharge }}</span>
					</div>
				</el-col>
			</el-row>

			<el-row>
				<el-col :span="12">
					<div class="grid-content bg-purple">
						<span class="titles">项目地址</span>
						<span class="titleNames">{{ projectInfo.projectAddress }}</span>
					</div>
				</el-col>
				<el-col :span="12" v-show="options.companyTitle != '企业信息'">
					<div class="grid-content bg-purple-light">
						<span class="titles">结算周期</span>
						<span class="titleNames">{{ projectInfo.clearingForm }}</span>
					</div>
				</el-col>
			</el-row>
			<el-row>
				<el-col :span="12">
					<div class="grid-content bg-purple">
						<span class="titles">服务内容</span>
						<span class="titleNames">{{ projectInfo.projectContent }}</span>
					</div>
				</el-col>
				<el-col :span="12" v-if="projectInfo.projectPhotos" v-show="!projectInfo.projectPhotomark">
					<div class="grid-content bg-purple-light">
						<span class="titles">项目现场照片</span>
						<div>
							<img v-for="item in projectInfo.projectPhotos" class="logos" @click="enlargeImg(item)"
								:src="item" alt="">
						</div>


					</div>
				</el-col>
			</el-row>

			<el-row>
				<el-col :span="12">
					<div class="grid-content bg-purple">
						<span class="titles">人员标准</span>
						<span class="titleNames">{{ projectInfo.projectStandard }}</span>
					</div>
				</el-col>

			</el-row>

			<el-row v-show="projectInfo.remark && options.companyTitle == '项目详情'">
				<el-col :span="12">
					<div class="grid-content bg-purple" v-show="projectInfo.remark">
						<span class="titles" style="color: red;">下架理由</span>
						<span class="titleNames">{{ projectInfo.remark }}</span>
					</div>
				</el-col>

			</el-row>
			<div v-show="mark">
				<el-input type="textarea" placeholder="请输入审核不通过理由" v-model="auditResult"></el-input>
			</div>
			<div v-show="options.companyTitle == '项目详情'" class="auditBox">
				<!-- <comTable :options="projectInfo.arrData"></comTable> -->
				<h2>审核信息</h2>
				<div class="audit">
					<p class="tableItem">
						<span>审核人</span>
						<span>审核结果</span>
						<span>审核时间</span>
						<span>审核说明</span>
					</p>
					<p class="tableItem whiteBack">
						<span>{{ projectInfo.authName }}</span>
						<span>{{ projectInfo.authResult }}</span>
						<span>{{ projectInfo.authTime }}</span>
						<span>{{ projectInfo.disapprove }}</span>
					</p>
				</div>
			</div>




		</div>

		<div class="openAccount" v-show="options.companyTitle == '导入' || options.companyTitle == '查看明细'">
			<el-row class="halfBox">
				<el-col :span="24">
					<div class="grid-content bg-purple">
						<span class="titles">项目名称</span>
						<span class="titleNames"><input type="text" class="noneInput" placeholder="请输入项目名称"
								v-model="projectName" />
						</span>
					</div>
				</el-col>
			</el-row>
			<el-row class="halfBox">
				<el-col :span="24">
					<div class="grid-content bg-purple">
						<span class="titles">企业名称</span>
						<span class="titleNames"><input type="text" class="noneInput" placeholder="请输入企业名称"
								v-model="companyName" /></span>
					</div>
				</el-col>
			</el-row>

			<el-row class="halfBox" v-show="options.companyTitle != '查看明细' && tableData.length == 0">
				<el-col :span="24">
					<div class="grid-content bg-purple">
						<span class="titles">表格上传</span> <br>
						<span class="title-desc">(序号，收款账户名称，收款账号，金额，附言，身份证号码)</span>
						<span class="titleNames"><input type="text" class="noneInput" /></span>
						<el-upload class="avatar-uploader" :on-change="onChange" :auto-upload="false" action
							:show-file-list="false" :limit="3" :http-request="getExcel" accept=".xlsx,.xls"
							:on-success="uploadSucess">
							<i class="el-icon-plus borderPlus"></i>
						</el-upload>

					</div>
				</el-col>
			</el-row>
			<el-row class="halfBox rightBox">
				<el-col :span="24">
					<div class="grid-content bg-purple">
						<span class="titles" style="margin-bottom: 20px;">备注</span>
						<el-input type="textarea" :autosize="{ minRows: 4, maxRows: 6 }" placeholder="请输入备注"
							v-model="remark"></el-input>

					</div>
				</el-col>
			</el-row>
			<el-row class="marTop">
				<el-col :span="24">
					<el-table :data="tableData" v-show="tableData.length != 0 && !options.index">
						<el-table-column prop="accountName" label="收款账户名称">
						</el-table-column>
						<el-table-column prop="cardNum" label="身份证号码">
						</el-table-column>
						<el-table-column prop="accountNo" label="收款账号">
						</el-table-column>
						<el-table-column prop="money" label="金额">
						</el-table-column>
						<el-table-column prop="postscript" label="附言">
						</el-table-column>

					</el-table>
					<!-- <el-table :data="tableData" v-show="tableData.length != 0 && options.index == 3">
						<el-table-column prop="accountName" label="收款账户名称">
						</el-table-column>
						<el-table-column prop="accountNo" label="收款账号">
						</el-table-column>
						<el-table-column prop="money" label="金额">
						</el-table-column>
						<el-table-column prop="postscript" label="附言">
						</el-table-column>
					</el-table> -->

					<el-table :data="tableData" v-show="tableData.length != 0 && options.index == 1">
						<el-table-column prop="accountName" label="收款账户名称">
						</el-table-column>
						<el-table-column prop="cardNum" label="身份证号码">
						</el-table-column>
						<el-table-column prop="accountNo" label="收款账号">
						</el-table-column>
						<el-table-column prop="money" label="金额">
						</el-table-column>
						<el-table-column prop="postscript" label="附言">
						</el-table-column>
						<el-table-column prop="updateTime" label="到账时间">
						</el-table-column>
					</el-table>

					<el-table :data="tableData" v-show="tableData.length != 0 && options.index == 2" class="dis">
						<el-table-column prop="accountName" label="收款账户名称">
							<template slot-scope="scope">
								<el-input v-model="scope.row.accountName" class="noneStyle"
									:disabled="!(options.companyTitle == '导入' && options.index == 2)"></el-input>
							</template>
						</el-table-column>
						<el-table-column prop="cardNum" label="身份证号码">
							<template slot-scope="scope">
								<el-input v-model="scope.row.cardNum" class="noneStyle"
									:disabled="!(options.companyTitle == '导入' && options.index == 2)"></el-input>
							</template>
						</el-table-column>
						<el-table-column prop="accountNo" label="收款账号">
							<template slot-scope="scope">
								<el-input v-model="scope.row.accountNo"
									:disabled="!(options.companyTitle == '导入' && options.index == 2)"
									class="noneStyle"></el-input>
							</template>
						</el-table-column>
						<el-table-column prop="money" label="金额">
							<template slot-scope="scope">
								<el-input v-model="scope.row.money"
									:disabled="!(options.companyTitle == '导入' && options.index == 2)"
									class="noneStyle"></el-input>
							</template>
						</el-table-column>
						<el-table-column prop="postscript" label="附言">
							<template slot-scope="scope">
								<el-input v-model="scope.row.postscript"
									:disabled="!(options.companyTitle == '导入' && options.index == 2)"
									class="noneStyle"></el-input>
							</template>
						</el-table-column>
						<el-table-column prop="updateTime" label="反馈失败时间">
							<!-- <template slot-scope="scope">
								<el-input v-model="scope.row.updateTime" :disabled="!(options.companyTitle == '导入' && !options.export)"
									class="noneStyle"></el-input>
							</template> -->
						</el-table-column>
						<el-table-column prop="remarks" label="失败原因">
							<!-- <template slot-scope="scope">
								<el-input v-model="scope.row.remarks" class="noneStyle"></el-input>
							</template> -->
						</el-table-column>
						<el-table-column fixed="right" label="操作"
							v-if="options.companyTitle == '导入' && options.index == 2">
							<template slot-scope="scope">
								<el-button @click.native.prevent="deleteRow(scope.$index, tableData, scope.row)"
									type="text" size="small">
									移除
								</el-button>
							</template>
						</el-table-column>
					</el-table>
					<span v-show="tableData.length != 0" class="countTotal">共计：{{ tableData.length }}条</span>
					<span v-show="tableData.length != 0" class="countTotal" style="margin-left: 31px;">总金额：{{
						options.price.toFixed(2) }}元</span>
					<span v-show="tableData.length != 0 && options.companyTitle == '查看明细'"
						class="countTotal fright">发起时间：{{
						insertTime || ''
						}}</span>
				</el-col>
			</el-row>
			<el-row v-show="options.companyTitle != '查看明细'">
				<el-col :span="12">
					<div class="grid-content bg-purple">
						<span class="titles">管理员手机号</span>
						<span class="titleNames"><input type="text" class="noneInput" v-model="telnum" /></span>
					</div>
				</el-col>
				<el-col :span="12">
					<div class="grid-content bg-purple" v-show="options.companyTitle != '查看明细'">
						<span class="titles">管理员验证码</span>
						<span class="titleNames"><input type="text" class="noneInput" placeholder="请输入验证码"
								v-model="code" /></span>
						<span class="getCodeBtn" v-show="show" @click="getCodes(2)">获取验证码</span>
						<span v-show="!show" class="count">已发送{{ count }} s</span>
					</div>
				</el-col>

			</el-row>

			<div class="oprationBtn" v-show="options.companyTitle != '查看明细'">
				<button class="cancel" @click="options.open = false">取消</button><button class="oprations"
					@click="toRecharge">确认</button>
			</div>


			<div class="oprationBtn" v-show="options.companyTitle == '查看明细' && options.index == 2">
				<button class="cancel" @click="options.open = false">取消</button><button class="oprations"
					@click="options.companyTitle = '导入'">再次打款</button>
			</div>

			<!-- <div class="oprationBtn" v-show="options.companyTitle == '导入' && options.index == 2">
				<button class="cancel" @click="options.open = false">取消</button><button class="oprations" @click="toNextRecharge">
					确认</button>
			</div> -->

		</div>
		<div class="openAccount" v-show="options.companyTitle == '实名认证'">
			<el-row>
				<el-col :span="24">
					<div class="grid-content bg-purple">
						<span class="titles">姓名</span>
						<span class="titleNames">{{ projectInfo.userName }}</span>
					</div>
				</el-col>
			</el-row>
			<el-row>
				<el-col :span="24">
					<div class="grid-content bg-purple">
						<span class="titles">身份证号码</span>
						<span class="titleNames">{{ projectInfo.realCartid }}</span>
					</div>
				</el-col>
			</el-row>
			<el-row>
				<el-col :span="24">
					<div class="grid-content bg-purple">
						<span class="titles">身份证正面照片（头像面）</span>
						<span class="titleNames"><img :src="projectInfo.identityFront" alt=""
								@click="enlargeImg(projectInfo.identityFront)" class="imgWid"></span>
					</div>
				</el-col>
			</el-row>
			<el-row>
				<el-col :span="24">
					<div class="grid-content bg-purple">
						<span class="titles">身份证反面照片（国徽面）</span>
						<span class="titleNames"><img :src="projectInfo.identityReverses" alt=""
								@click="enlargeImg(projectInfo.identityReverses)" class="imgWid"></span>
					</div>
				</el-col>
			</el-row>
		</div>


		<div class="openAccount" v-show="options.companyTitle == '账户信息'">
			<el-row>
				<el-col :span="24">
					<div class="grid-content bg-purple">
						<span class="titles">账户名称</span>
						<span class="titleNames">{{ projectInfo.companyName || projectInfo.realName }}</span>
					</div>
				</el-col>
			</el-row>
			<el-row>
				<el-col :span="24">
					<div class="grid-content bg-purple">
						<span class="titles">银行账号</span>
						<span class="titleNames">{{ projectInfo.bankAccount }}</span>
					</div>
				</el-col>
			</el-row>
			<el-row>
				<el-col :span="24">
					<div class="grid-content bg-purple">
						<span class="titles">开户行</span>
						<span class="titleNames">{{ projectInfo.openBank || projectInfo.openingBank }}</span>
					</div>
				</el-col>
			</el-row>
			<el-row>
				<el-col :span="24">
					<div class="grid-content bg-purple">
						<span class="titles">银行名称</span>
						<span class="titleNames">{{ projectInfo.accountName }}</span>
					</div>
				</el-col>
			</el-row>
		</div>


		<div class="openAccount" v-show="options.companyTitle == '数据修复'">
			<el-row>
				<el-col :span="24">
					<div class="grid-content bg-purple">
						<span class="titles">企业名称</span>
						<span class="titleNames">{{ projectInfo.companyName }}</span>
					</div>
				</el-col>
			</el-row>
			<el-row>
				<el-col :span="24">
					<div class="grid-content bg-purple">
						<span class="titles">项目名称</span>
						<span class="titleNames">{{ projectInfo.projectName }}</span>
					</div>
				</el-col>
			</el-row>
			<el-row>
				<el-col :span="24">
					<div class="grid-content bg-purple">
						<span class="titles">服务者</span>
						<span class="titleNames">{{ projectInfo.userName }}</span>
					</div>
				</el-col>
			</el-row>
			<el-row>
				<el-col :span="24">
					<div class="grid-content bg-purple">
						<span class="titles">支付金额</span>
						<span class="titleNames red">{{ projectInfo.cost }}</span>
					</div>
				</el-col>
			</el-row>
			<el-row>
				<el-col :span="24">
					<div class="grid-content bg-purple">
						<span class="titles">支付失败原因</span>
						<el-input type="textarea" :rows="4" class="txtare" placeholder="请输入支付失败原因"
							v-model="projectInfo.textarea">
						</el-input>
					</div>
				</el-col>
			</el-row>


			<div class="bottomTools">
				<button @click="options.open = false" class="cancel">取消</button>
				<button @click="fail(projectInfo)" class="offsetBtn" v-preventClick>确认</button>
			</div>
		</div>



		<div class="openAccount" v-show="options.companyTitle == '企业信息'">

			<el-row>
				<el-col :span="12">
					<div class="grid-content bg-purple">
						<span class="titles">企业logo</span>
						<img class="logos" @click="enlargeImg(projectInfo.logo)" :src="projectInfo.logo" alt="">
					</div>
				</el-col>
				<el-col :span="12">
					<div class="grid-content bg-purple-light">
						<span class="titles">营业执照</span>
						<img class="logos" @click="enlargeImg(projectInfo.businessLicense)"
							:src="projectInfo.businessLicense" alt="">
					</div>
				</el-col>
			</el-row>
			<el-row>
				<el-col :span="12">
					<div class="grid-content bg-purple">
						<span class="titles">企业名称</span>
						<span class="titleNames">{{ projectInfo.companyName }}</span>
					</div>
				</el-col>
				<el-col :span="12" v-show="options.companyTitle != '企业信息'">
					<div class="grid-content bg-purple-light">
						<span class="titles">管理员姓名</span>
						<span class="titleNames">{{ projectInfo.administratorName }}</span>
					</div>
				</el-col>
				<el-col :span="12">
					<div class="grid-content bg-purple">
						<span class="titles">所在地区</span>
						<span class="titleNames">{{ projectInfo.city }}{{ projectInfo.area }}{{ projectInfo.address
							}}</span>
					</div>
				</el-col>
			</el-row>
			<el-row v-show="projectInfo.briefIntroduction ||projectInfo.email">

				<el-col :span="12" v-show="projectInfo.email">
					<div class="grid-content bg-purple-light">
						<span class="titles">邮箱</span>
						<span class="titleNames">{{ projectInfo.email }}</span>
					</div>
				</el-col>
				<el-col :span="12" v-show="projectInfo.briefIntroduction ">
					<div class="grid-content bg-purple">
						<span class="titles">企业简介</span>
						<span class="titleNames">{{ projectInfo.briefIntroduction }}</span>
					</div>
				</el-col>
			</el-row>

			<el-row class="noenBoder">
				<el-col :span="12">
					<div class="grid-content bg-purple-light">
						<span class="titles">管理员手机号</span>
						<span class="titleNames">{{ projectInfo.administratorPhone }}</span>
					</div>
				</el-col>

				<el-col :span="12">
					<div class="grid-content bg-purple">
						<span class="titles">法人</span>
						<span class="titleNames">{{ projectInfo.legalPerson }}</span>
					</div>
				</el-col>
			</el-row>
			<el-row>

				<el-col :span="12" v-show="options.companyTitle != '企业信息'">
					<div class="grid-content bg-purple-light">
						<span class="titles">结算周期</span>
						<span class="titleNames">{{ projectInfo.clearingForm }}</span>
					</div>
				</el-col>
			</el-row>


		</div>

		<div class="warn-dialog-body" v-show="options.companyTitle == '下架'">
			<el-input type="textarea" placeholder="请输入下架理由内容" v-model="offsetValue"
				:autosize="{ minRows: 2, maxRows: 6 }"></el-input>
			<div class="bottomTools">
				<button @click="options.open = false" class="cancel">取消</button>
				<button @click="sureOffset(projectInfo)" class="offsetBtn" v-preventClick>确认</button>
			</div>
		</div>

		<div class="warn-dialog-body" v-show="options.companyTitle == '通知'">
			<el-input type="textarea" placeholder="请输入发送内容" v-model="sendMsgValue"
				:autosize="{ minRows: 2, maxRows: 6 }"></el-input>
			<div class="bottomTools">
				<button @click="options.open = false" class="cancel">取消</button>
				<button @click="sendMsg(projectInfo)" class="offsetBtn" v-preventClick>确认</button>
			</div>
		</div>

		<div class="bottomTool paddingBottom" v-show="!mark && options.companyTitle == '项目审核'">
			<button class="pur" @click="mark = true">审核不通过</button>
			<button @click="subAuth(projectInfo)">审核通过</button>
		</div>




		<div class="bottomTool" v-show="mark">
			<button class="pur" @click="options.open = false">取消</button>
			<button @click="subAuth(projectInfo, true)" v-preventClick>确认</button>
		</div>


		<el-dialog :visible.sync="dialogVisible" :modal-append-to-body="false" width="600px">
			<img style="margin: 10%;width: 80%;" :src="dialogImageUrl" alt="">
		</el-dialog>
	</el-dialog>
</template>

<script>
	import XLSX from 'xlsx';
	export default {
		components: {
			comTable: () => import("../../telRecruit/commonComponents/comTable.vue"),
		},
		props: {
			options: {
				type: Object,
				require: true
			},
			projectInfo: {
				type: Object,
				require: true
			},
			uploadData: {
				type: Object,
				require: true
			},

			// systemPhone: {
			// 	type: String,
			// 	defualt: '',
			// },
			// systemAccount: {
			// 	type: String,
			// 	defualt: '',
			// }
		},
		data() {
			return {
				sid: '',
				status: '',
				offsetValue: '', //下架理由
				auditResult: '',
				mark: false,
				dialogVisible: false,
				dialogImageUrl: '',
				projectName: "",
				companyName: '',
				condition: {},
				tableData: [],
				countPrice: 0,
				fileData:{},
				remark: '',
				insertTime: '',
				sendMsgValue: '',
				code: '',
				timer: null,
				count: 0,
				show: true,
				telnum: '133****2199',
				checkCode: '',
				amount: '',
				fileUrl: '',
				agreementName: ""
				// systemAccount: '',
				// systemPhone: '',
			}
		},
		watch: {
			'options.open'(val) {

				if (val) {
					console.log(this.options);
					this.countPrice = this.options.price;
					console.log(this.countPrice);
				}
			},

			//value为编辑框输入的内容，这里我监听了一下值，当父组件调用得时候，如果给value赋值了，子组件将会显示父组件赋给的值
		},

		methods: {
			// 文件选择回调
			onChange(file, fileList) {
				this.fileData = file; // 保存当前选择文件
				this.readExcel(); // 调用读取数据的方法
			},
			subFile() {
				let data = {
					companyId: this.projectInfo.companyId,
					agreementName: this.agreementName,
					fileUrl: this.fileUrl
				}
				this.$emit('subFile', data)
			},
			delFile(data) {
				this.$emit('delFile', data)
			},
			subAccount() {
				let data = {
					companyId: this.projectInfo.companyId,
					systemAccount: this.projectInfo.systemAccount,
					systemPhone: this.projectInfo.systemPhone,
				}
				const regex = /^1[3456789]\d{9}$/
				if (data.systemAccount == '') return this.$message.error('请输入账号')
				if (data.systemPhone == '') return this.$message.error('请输入手机号')
				if (!regex.test(data.systemPhone)) return this.$message.error('请输入正确的手机号')
				let url = 'v1/companySystemAccount/addSystemAccount'
				if (this.projectInfo.sysetmStatus == '2') {
					url = '/v1/companySystemAccount/updateAccoutPassword'
				}
				console.log(data);
				this.$ceshiAxiosWechat.post(url, data).then(res => {
					if (res.data.code == 1) {
						this.$message.success('操作成功！')
						this.projectInfo.companyId = ''
						this.systemAccount = ''
						this.$emit('addCompany')
					} else {
						this.$message.error(res.data.message)
					}
				})
			},
			uploadSucess() {

			},
			checkMonney() {
				if (parseFloat(this.projectInfo.amount) < parseFloat(this.amount)) {
					this.amount = ''
					this.$message.error('充值积分不得大于汇款金额！')
				}
			},
			deleteRow(index, rows, row) {
				console.log(rows, index, row)
				this.$ceshiAxiosWechatceshi.post('/salarPaymentInfomation/updateFailedInfomation', { sid: row.infomationId }).then(res => {
					console.log(res)
				})
				rows.splice(index, 1);
				this.tableData = rows

			},
			subRecharage() {
				let data = {
					code: this.checkCode,
					amount: this.amount,
					companyName: this.projectInfo.companyName,
					rid: this.projectInfo.rid,
					accountNo: this.projectInfo.accountNo,
					orderNumber: this.projectInfo.orderNumber

				}
				const regex = /^\d+(?:\.\d{1,2})?$/;
				if (data.code == '' || data.code == undefined) return this.$message.error('请输入验证码')
				if (data.amount == '') return this.$message.error('请输入充值金额')
				if (!regex.test(data.amount)) return this.$message.error('充值金额只能为数字')
				this.$ceshiAxiosWechatceshiGet('/v1/rechargeCompany/paymentOperation', data).then(res => {
					if (res.data.code == 1) {
						this.options.open = false
						this.count = 1
						this.$emit('subRecharage')
						this.$message.success('充值成功')
					} else {
						this.$message.error(res.data.message)
					}
				})
			},
			counTime() {
				let that = this
				const TIME_COUNT = 60;
				if (!that.timer) {
					that.count = TIME_COUNT;
					that.show = false;
					that.timer = setInterval(() => {
						if (that.count > 0 && that.count <= TIME_COUNT) {
							that.count--;
						} else {
							that.show = true;
							clearInterval(that.timer);
							that.timer = null;
						}
					}, 1000)
				}
			},
			getCode() {

			},
			toNextRecharge() {
				this.options.companyTitle = '导入'
				this.btnValue = '确认'

			},
			toRecharge() {
				let paytype = 1;

				if (this.options.index == 2) {
					paytype = 2
					let params = {
						sid: this.sid
					}
					this.$ceshiAxiosWechatceshi.post('/salarPaymentInfomation/updateFailedInfomation', params).then(res => {
						console.log(res)
					})
				}

				if (this.tableData[0].infomationId != undefined) {
					paytype = 2
				} else {
					paytype = 1
				}


				let data = {
					companyName: this.companyName,
					code: this.code,
					projectName: this.projectName,
					remarks: this.remark,
					paymentList: this.tableData,
					paytype: paytype
				}

				if (data.companyName == '') return this.$message.error('请输入企业名称');
				if (data.projectName == '') return this.$message.error('请输入项目名称');
				if (data.remarks == '') return this.$message.error('请输入备注');
				if (data.code == '') return this.$message.error('请输入验证码');
				if (this.tableData.length == 0) return this.$message.error('请上传要导入的数据');
				console.log(data)
				this.countPrice = 0

				this.$ceshiAxiosWechatceshi.post('/salarPaymentInfomation/directPayment', data).then(res => {
					if (res.data.code == 1) {
						this.$emit('toWaitting')
						this.$message.success('打款成功');
						this.companyName = '';
						this.code = '';
						this.projectName = '';
						this.tableData = [];
						this.options.open = false

					} else {
						this.$message.error(res.data.message);
					}
				})
			},
			getCodes(index) {
				let codestr = 13301782199 + "/" + "@$%&12#3$#@"
				let md5code = this.$md5(codestr)
				console.log(md5code);
				let params = {
					phone: 18075525105,
					encryptCode: md5code,
					type: index
				}

				this.$ceshiAxiosWechatceshi.post('/v1/common/sendMsg', params).then(res => {
					if (res.data.code == 1) {
						this.counTime()
						this.$message.success('发送成功')
					} else {
						this.$message.error(res.data.message)
					}
				})

			},
			analysis(file) {
				return new Promise(function (resolve, reject) {
					const reader = new FileReader();
					reader.onload = function (e) {
						const data = e.target.result;
						let datajson = XLSX.read(data, {
							type: "binary"
						});
						const result = [];
						datajson.SheetNames.forEach(sheetName => {
							result.push({
								sheetName: sheetName,
								sheet: XLSX.utils.sheet_to_json(datajson.Sheets[sheetName])
							});
						});
						resolve(result);
					};
					reader.readAsBinaryString(file.file);
				});
			},
			uploadSucessPDf(data) {
				console.log(data);
				console.log(data.data.url);
				this.fileUrl = data.data
			},
			getFileExtension(filename) {
				// 使用lastIndexOf方法找到最后一个点的位置
				const lastDotIndex = filename.lastIndexOf('.');

				// 检查是否存在点，并且它不在文件名的开头或结尾位置
				if (lastDotIndex !== -1 && lastDotIndex > 0 && lastDotIndex < filename.length - 1) {
					// 使用substring方法获取从最后一个点之后的部分作为后缀
					return filename.substring(lastDotIndex + 1);
				} else {
					return '';
				}
			},
			uploadBefores(data) {
				console.log(data);
				let fileName = this.getFileExtension(data.name)
				this.agreementName = data.name
				if (fileName == 'pdf') {
					this.condition.condition = 1
				} else if (fileName == 'doc||docx') {
					this.condition.condition = 2
				} else if (fileName == 'xls' || fileName == 'xlsx') {
					this.condition.condition = 4
				}
			},
			getPdf(file) {
				console.log(file);
				const types = file.file.name.split(".")[1]; //获取文件后缀
				const fileType = ["pdf"].some(
					item => item === types
				);
				if (!fileType) {
					this.$message("格式错误！请重新选择");
					return;
				}


			},

			// 读取数据
			readExcel(e) {
				let that = this;
				let tablesdata = []
				const files = that.fileData;
				if (!files) {
					// 如果没有文件 - 当然也可以提醒用户弹个警告框 但是基本没有这种情况的出现
					return false;
				} else if (!/\.(xls|xlsx)$/.test(files.name.toLowerCase())) {
					// 文件格式的判断
					this.$message.error("上传格式不正确，请上传xls或者xlsx格式");
					return false;
				}
				const fileReader = new FileReader();
				fileReader.onload = (ev) => {
					try {
						const data = ev.target.result;
						// console.log(data)
						const workbook = XLSX.read(data, {
							type: "binary",
						});
						console.log(workbook.SheetNames);
						// 取第一张表
						const wsname = workbook.SheetNames[0];
						// 生成json表格内容
						const ws = XLSX.utils.sheet_to_json(workbook.Sheets[wsname]);
						console.log(ws);
						// 循环 ws 取得其中的数据 
						// 把 ws 打印出来 就可以看得很清楚了 之后就进行自己想要的操作就可以了
						// 没有一样的代码 没有一样的需求

						ws.map((item) => {

							let obj = {
								accountName: item['收款账户名称'],
								cardNum: item['身份证号码'],
								accountNo: item['收款账号'],
								money: item['金额'],
								postscript: item['附言'],
							}

							for (let key in obj) {
								if (typeof obj[key] === 'string' && obj[key].includes(' ')) {
									obj[key] = obj[key].replace(/\s/g, '');
								}
							}
							console.log(obj.postscript);
							if (obj.accountName != undefined && obj.cardNum != undefined && obj.cardNum != '' && obj.accountNo != undefined && obj.money != undefined && obj.accountName != '' && obj.accountNo != '' && obj.money != '' && obj.postscript != '') {
								tablesdata.push(obj)
							}
							else {
								setTimeout(() => {
									this.$message.error( obj.accountName + '：该账户数据缺失')
								}, 1000)
							}

						})

					 this.tableData = tablesdata
				this.countPrice = 0
				this.options.price = 0
				this.tableData.forEach(res => {
					console.log(res.money);
					this.options.price += Number(res.money)
				})
				console.log(this.countPrice);
					 
						 
						 
						 

					} catch (e) {
						return false;
					}
				};
				
				fileReader.readAsBinaryString(files.raw);
			},
			getExcel(file) {
				console.log(file);
				const types = file.file.name.split(".")[1]; //获取文件后缀
				const fileType = ["xlsx", "xls"].some(
					item => item === types
				);
				if (!fileType) {
					this.$message("格式错误！请重新选择");
					return;
				}
				let data = []

				console.log(fileType);
				this.analysis(file).then(tableJson => {
					console.log(tableJson);
					if (tableJson && tableJson.length > 0) {
						//成功解析出数据
						let dataExcel = tableJson[0];
						console.log("数据", dataExcel);
						let tableData = []
						tableData = dataExcel.sheet

						tableData.map((item) => {

							let obj = {
								accountName: item['收款账户名称'],
								cardNum: item['身份证号码'],
								accountNo: item['收款账号'],
								money: item['金额'],
								postscript: item['附言'],
							}

							for (let key in obj) {
								if (typeof obj[key] === 'string' && obj[key].includes(' ')) {
									obj[key] = obj[key].replace(/\s/g, '');
								}
							}
							console.log(obj.postscript);
							if (obj.accountName != undefined && obj.cardNum != undefined && obj.cardNum != '' && obj.accountNo != undefined && obj.money != undefined && obj.accountName != '' && obj.accountNo != '' && obj.money != '' && obj.postscript != '') {
								data.push(obj)
							}
							else {
								setTimeout(() => {
									this.$message.error(obj.accountName + '：该账户数据缺失')
								}, 1000)
							}

						})
						console.log(data);
						if (data.length > 60) {
							this.tableData = data.splice(60)
							this.$message.warning('导入的数据最多60条！')
						}

						this.tableData = data
						this.countPrice = 0
						this.options.price = 0
						this.tableData.forEach(res => {
							console.log(res.money);
							this.countPrice += Number(res.money)
						})



					}
				});
			},
			fail(data) {
				this.$emit('fail', data)
			},
			sendMsg(data) {
				this.$emit('sendMsg', data)
			},
			sureOffset(data) {
				this.$emit('sureOffset', data)
			},
			subAuth(data, mark) {
				let auditor = '审核通过'
				this.status = 1
				if (mark) {
					auditor = '审核不通过'
					this.status = 2
				}
				console.log(this.status);
				data = Object.assign(data, {
					status: this.status
				})
				this.$emit('subAuth', data)
			},
			// 图片放大
			enlargeImg(src) {
				this.dialogVisible = true;
				this.dialogImageUrl = src;
			}
		}
	}
</script>

<style scoped="scoped">
	.msgBox {
		padding: 10px 20px;
		font-size: 18px;
		height: 300px;
	}

	.delBox {
		float: right;
		color: red;
		cursor: pointer;
	}


	.setBox /deep/ .el-col {
		border-bottom: 1px solid #E5E5E5;
		padding-bottom: 15px;
	}

	.rechageBox {
		margin: 20px 55px;
	}

	.rechageBox /deep/.el-col {
		margin-bottom: 15px;

	}

	.red {
		color: red;
		text-align: center;
		height: 200px;
	}

	.warn-dialog-header {
		font-size: 16px;
		box-sizing: border-box;
		padding: 20px;
		border-bottom: 1px solid #bfbfbf;
	}

	.warn-dialog-header::before {
		content: '';
		border-left: 8px solid #0064e4;
		margin-right: 10px;
	}

	.projectBox {
		width: 100%;
		margin: 0 auto;
		border-bottom: 1px solid #E5E5E5;
		padding-bottom: 14px;
		height: 62px;
		line-height: 62px;
	}

	.noneStyle /deep/ .el-input__inner {
		border: none;
	}

	.pd {
		text-align: left;
	}

	.boxItem {
		display: inline-block;
		width: 250px;
		text-align: left;
		margin-right: 95px;
		overflow: hidden;
		text-overflow: ellipsis;
		white-space: nowrap;

	}

	.txtare {
		display: inline-block;
		width: 103%;
		margin-top: 14px;
	}

	.payBox {
		padding: 20px 40px;
	}

	.titles {
		font-size: 20px;
		font-family: PingFang SC;
		font-weight: 300;
		color: #000000;
		margin-right: 40px;
		display: inline-block;
		width: 120px;

	}

	.getCode {
		color: blue;
		cursor: pointer;
		font-size: 17px;
		float: right;
	}

	.title-desc {
		width: 384px;
		text-align: left;
		padding-left: -1px;
		line-height: 30px;
	}

	.getCodeBtn {
		font-size: 20px;
		font-family: PingFang SC;
		font-weight: 300;
		color: #0000FF;
		cursor: pointer;
	}

	.count {
		font-size: 20px;
		font-family: PingFang SC;
		font-weight: 300;
		color: #000000;
		cursor: pointer;
	}

	.borderPlus {
		width: 150px;
		height: 150px;
		font-size: 30px;
		line-height: 150px;
		border: 1px dashed #8c939d;
		border-radius: 6px;

	}

	.remind {
		color: red;
		font-size: 16px;
	}

	.titleNames {
		font-size: 20px;
		font-family: PingFang SC;
		font-weight: 300;
		color: #363636;

		line-height: 36px;
	}

	.titleNames input {
		width: 250px !important;
	}

	.uploaDagreement {
		padding: 30px;
	}

	.el-row {
		border-bottom: 1px solid #E5E5E5;
		padding-bottom: 16px;
		margin-bottom: 20px;

		&:last-child {
			margin-bottom: 0;
		}
	}

	.noneInput {
		border: none;
		width: 290px;
		height: 30px;
		font-size: 20px;
		line-height: 30px;
	}

	.noneInput::placeholder {
		/* placeholder样式 */
		color: gray;
		font-size: 20px;
	}

	.titleNames input:focus {
		outline: none;
	}

	.titleNames input:hover {
		outline: none;
		background-color: white;
	}


	.el-col {
		border-radius: 4px;
	}

	.grid-content {
		border-radius: 4px;
		padding-right: 20px;
	}

	.countTotal {
		padding-top: 13px;
		display: inline-block;
	}

	.fright {
		float: right;
	}

	.red {
		color: red
	}

	.tableItem {
		background-color: rgb(186, 226, 255);
		text-align: center;
	}

	.audit {
		padding: 20px 4px;
	}

	.whiteBack {
		background-color: white;
	}

	.tableItem span {
		color: black;
		text-align: center;
		/* padding: 49px; */
		height: 10px;
		display: inline-block;
		font-size: 16px;
		height: 40px;
		line-height: 40px;
		width: 168px;

	}

	.openAccount {
		padding: 0 51px;
		margin-top: 29px;
	}

	.halfBox {
		width: 600px;
	}

	.marTop {
		margin-top: 120px;
	}

	.oprationBtn {
		text-align: center;
		height: 50px;
	}

	.cancel {
		width: 109px;
		padding: 8px 0px;
		border: 1px solid gray;
		border-radius: 8px;
		background: white;
		color: black;
	}

	.oprations {

		width: 109px;
		padding: 8px 0px;
		border: 1px solid gray;
		border-radius: 8px;
		background: white;
		color: white;
		background: rgb(29, 15, 255);
		margin-left: 70px;
	}

	.rightBox {
		position: absolute;
		top: 90px;
		right: 26px;
		width: 400px;
		border-bottom: none;
	}

	.row-bg {
		padding: 10px 0;
		background-color: #f9fafc;
	}


	.warn-dialog-body {
		box-sizing: border-box;
		padding: 40px;
	}

	.warn-dialog-body-title {
		font-size: 16px;
		margin-bottom: 20px;
	}

	.warn-dialog-btn {
		margin-top: 20px;
		text-align: center;
	}



	.pdf-logo {
		width: 100px;
	}

	.agent-top .item {
		float: left;
		width: 46%;
		margin: 10px 2%;
	}

	.item .label,
	.item .text,
	.item .img {
		float: left;
		margin-right: 10px;
		font-size: 12px;
	}

	.logos {
		width: 50px;
		height: 50px;
		padding-top: 12px;
		padding-left: 10px;

	}

	.bottomTool {
		text-align: center;
	}

	.imgWid {
		width: 150px;
		height: 100px;
	}

	.paddingBottom {
		padding-bottom: 38px;
	}

	/deep/ .el-textarea__inner {
		font-size: 20px;
		font-family: "PingFang SC";
		font-weight: 300;
		color: rgb(0, 0, 0);
	}

	.bottomTools {
		text-align: center;
		line-height: 75px;
	}

	.noneStyle input:disabled {
		background-color: rgb(252, 252, 252);
	}

	/deep/.el-input.is-disabled .el-input__inner {
		background-color: white;
		border-color: #E4E7ED;
		color: #606266;
		cursor: not-allowed;
	}

	.dis /deep/ .el-input:hover {
		background-color: rgb(245, 247, 250);
	}

	/deep/.el-input.is-disabled .el-input__inner:hover {
		background-color: rgb(245, 247, 250);
		border-color: #E4E7ED;
		color: #606266;
		cursor: not-allowed;
	}

	/deep/.el-input .el-input__inner:hover {
		background-color: rgb(245, 247, 250);
		border-color: #E4E7ED;
		color: #606266;

	}

	/deep/.el-input__inner:focus {
		border-color: white;
	}

	.offsetBtn {
		margin-top: 40px;
		background: rgba(0, 0, 255, 1);
		border: 1px solid #707070;
		border-radius: 5px;
		color: white;
		padding: 4px 20px;
	}

	.bottomTools .cancel {
		padding: 4px 20px;
		background-color: white;
		border: 1px solid #707070;
		border-radius: 5px;
		color: #4E4E4E;
	}

	.pur {
		color: #4E4E4E !important;
		background-color: #FFFFFF !important;
	}

	.noenBoder {
		border: none;
	}

	.bottomTool button {
		padding: 4px 20px;
		font-family: PingFang SC;
		font-weight: 300;
		color: #FFFFFF;
		background-color: #0000FF;
	}

	.item .label {
		width: 130px;
		height: 30px;
		line-height: 30px;
	}

	.item .text {
		width: 240px;
		border: 1px solid #CECECE;
		height: 30px;
		line-height: 30px;
		padding-left: 10px;
	}

	.item .img {
		width: 240px;
		border: 1px dotted #CECECE;
		height: 180px;
		text-align: center;
	}

	.item .img img {
		width: 140px;
		margin-top: 15px;
	}

	.contract .contract-pdf {
		width: 140px;
		text-align: center;
		text-decoration: none;
		color: #000;
	}

	.contract .img-list {
		width: 80%;
		margin: 20px;
	}

	.img-list .item {
		width: 130px;
		margin: 0 10px;
		text-align: center;
		height: 180px;
	}

	.img-list .item img {
		width: 100px;
		margin: 10px 0;
		height: 120px;
	}

	.contract .reject {
		width: 98%;
		margin: 10px;
	}
</style>